package com.forenow.demo2;

public class Vehicle {
    private String brand;
    private String color;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    private double speed=0;


    public Vehicle(String brand,String color){
        this.brand=brand;
        this.color=color;
    }
    public void run(){
        System.out.println(getColor() + "的" + getBrand() + "的速度是" + getSpeed());
    }

}
